package com.example.keepserver.model;

import lombok.Data;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.ManyToOne;
import javax.persistence.JoinColumn;
import javax.persistence.Column;
import java.time.LocalDateTime;

@Data
@Entity
@Table(name = "routes")
public class Route {
    
    @Id
    private String routeId;
    
    private String title;
    
    @Column(columnDefinition = "TEXT")
    private String description;
    
    private Float distance;
    
    @ManyToOne
    @JoinColumn(name = "author_id")
    private User author;
    
    private Integer likesCount;
    private Integer usedCount;
    private String location;
    private LocalDateTime createdAt;
} 